<?php


$func = $_GET['func'];


if($func != null) {
	if($func == "logout")
		logout();
	else if($func == "login")
		login();
}
else {
	
}

function login() {
	setcookie("email", "yztan@nuskin.com", time()+3600);
	setcookie("userName", "Yan Zhang", time()+3600);
	
}

function logout() {
	header('Location: http://localhost/FYP/index.php'); 
	setcookie("email", "yztan@nuskin.com", time()-3600);
	setcookie("userName", "Yan Zhang", time()-3600);
	exit;
}


?>